/*
 * Copyright (c) 2017 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.serv.shop.vo;

import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @author zhangcm
 * @version 1.0, 2017/10/2
 */
public class ShopProductAttrSaveVo {

    @ApiModelProperty(value = "产品分类ID")
    private Long categoryId;
    @ApiModelProperty(value = "产品ID")
    private Long productId;
    @ApiModelProperty(value = "属性")
    private Attr attr = new Attr();

    public static class Attr {
        @ApiModelProperty(value = "ID")
        private Long id;
        @ApiModelProperty(value = "名称", required = true, allowableValues = "range[0, 20]")
        private String name;
        @ApiModelProperty(value = "子属性", required = true)
        private List<Attr> childList = Lists.newArrayList();

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<Attr> getChildList() {
            return childList;
        }

        public void setChildList(List<Attr> childList) {
            this.childList = childList;
        }
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Attr getAttr() {
        return attr;
    }

    public void setAttr(Attr attr) {
        this.attr = attr;
    }
}
